" copy to the dir aside
nmap <c-y> yy<c-w>wp
" toggle dotfile visibility
nmap <c-f> za

" move
nmap <c-c> dd<c-w>wp
nmap <c-n> :mkdir<space>

" Yank path to clipboard
nmap yd :!echo %d | xclip <cr>
nmap yf :!echo %c:p | xclip <cr>"

" Mappings for faster renaming
nmap I cw<c-a>
nmap cc cw<c-u>
nmap A cw<c-w>

nmap s :sort<cr>"

colorscheme Default

" Format for displaying time in file list. For example:
" TIME_STAMP_FORMAT=%m/%d-%H:%M
" See man date or man strftime for details.
set timefmt=%m/%d\ %H:%M

" Show list of matches on tab completion in command-line mode
set wildmenu
set ignorecase
set smartcase
set hlsearch
set incsearch

set scrolloff=6

" Set custom status line look
set statusline=' %t  %=  %A    %u:%g    %s    %d '
nmap <c-b> :marks<cr>

mark h ~
mark w ~/workspace/
mark d ~/Downloads/
mark v ~/.vim/
mark c ~/.config/

nmap <c-j> <C-W>J
nmap <c-k> <C-W>K
nmap <c-l> <C-W>L

command df df -h %m 2> /dev/null
command diff vim -d %f %F
command zip zip -r %f.zip %f
command run !! ./%f
command make !!make

" preview
" syntax highlighting with pygmentize. requires latest vifm for color escaping
fileview * pygmentize -O style=monokai
nmap w :view<cr>
nmap O :!vim %f<cr>
" Open file in the background using its default program
nmap o :!xdg-open %f<cr>


set trash
set trashdir="~/tmp/Trash"
set history=100

set followlinks

set fastrun
set norunexec
" vim:ft=vim
